Front-end scripts can be run automatically on certain triggering conditions.
To do so, set the run label to
either:
frontendStartup - when Trilium frontend
starts up (or is refreshed), but not on mobile.mobileStartup - when Trilium frontend starts
up (or is refreshed), on mobile.Backend scripts have more powerful triggering conditions, for example they can run automatically on a hourly or daily basis, but also on events such as when a note is created or an attribute is modified. See the server-side Events for more information.
While safe mode is active, scripts with events won't trigger.